package com.tensquare.search.pojo;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;

@Data
@Document(indexName = "tensquare_article",type = "article")
public class Article {

    @Id
    private String id;

    //是否索引:就是看该域是否能被搜索
    //是否分词:就表示该词是整体匹配还是部分匹配
    //是够存储:就是在页面上显示
    //searchAnalyzer 搜索分词器    analyzer:存储用的解析分词器
    @Field(index = true,searchAnalyzer = "ik_max_word",analyzer = "ik_max_word")
    private String title;

    @Field(index = true,searchAnalyzer = "ik_max_word",analyzer = "ik_max_word")
    private String content;

    private String state;//审核状态

}
